<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>柱形图</title>
    <style>
        .outer{
            width: 700px;
            height: 300px;
            border-left: 2px solid grey;
            border-bottom: 2px solid grey;
            /* background-color: antiquewhite; */
            display: flex;
            justify-content: space-around;
            align-items: end;
            margin: 0 auto;
        }
        .box{
            width: 65px;
            background-color: aqua;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            text-align: center;
        }
        .num{
            margin-top: -20px;
        }
        .quarter{
            margin-bottom: -30px;
        }
    </style>
</head>
<body>
    <!-- <div class="outer">
        <div class="box" style="height: 100px;">
            <div class="num">100</div>
            <div class="quarter">第1季度</div>
        </div>
        <div class="box">
            <div class="num">100</div>
            <div class="quarter">第2季度</div>
        </div>
        <div class="box">
            <div class="num">100</div>
            <div class="quarter">第3季度</div>
        </div>
        <div class="box">
            <div class="num">100</div>
            <div class="quarter">第4季度</div>
        </div>
       
    </div> -->

    <script>
        let arr=[]
        for(let i=1;i<=4;i++){
            arr.push(+prompt(`请输入第${i}季度`))
        }
        document.write(`<div class="outer">`)
        for(let i=0;i<4;i++){
            document.write(`
                <div class="box" style="height: ${arr[i]}px;">
                    <div class="num">${arr[i]}</div>
                    <div class="quarter">第${i+1}季度</div>
                </div>
            `)
        }
        
        document.write(`</div>`)
    </script>
</body>
</html>